package com.gzist.elderlyserviceplatform.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gzist.elderlyserviceplatform.common.base.BaseDO;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 文件附件表
 */
@Data
@TableName("file")
@Schema(description = "文件附件表")
public class File extends BaseDO {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "文件名称")
    private String fileName;

    @Schema(description = "文件类型")
    private String fileType;

    @Schema(description = "文件大小（字节）")
    private String fileSize;

    @Schema(description = "文件在Minio中的路径")
    private String filePath;

    @Schema(description = "上传者ID，关联user表的id")
    private String uploaderId;

    @Schema(description = "Minio存储桶名称")
    private String bucketName;

    @Schema(description = "Minio对象名称")
    private String objectName;

    @Schema(description = "文件访问外链")
    private String url;

    @Schema(description = "文件MD5")
    @TableField(exist = false)
    private String fileMd5;

}
